package cate.common.table.farm.island.row;

import cate.common.table.ERow;
import cate.common.table.XSSFRowWrap;
import cate.common.util.random.RWItem;
import easy.java.dev.note.NoteClass;
import easy.java.dev.note.NoteField;

@NoteClass(value = "迷失神庙商品")
public class IslandShopItemRow extends ERow implements RWItem {
    @NoteField(value = "商品内容")
    public String rewardStr;

    @NoteField(value = "价格")
    public String consumeStr;

    @NoteField(value = "权重")
    public double weight;

    @Override
    public void parse(XSSFRowWrap xrw) {
        super.parse(xrw);
        this.id = xrw.getInteger("ID");
        this.rewardStr = xrw.getString("商品内容");
        this.consumeStr = xrw.getString("价格");
        this.weight = xrw.getDouble("权重", 0.0);
    }

    @Override
    public double getWeight() {
        return weight;
    }
}
